package com.xuecheng.search.interfaces.web;

import com.xuecheng.base.model.PageResult;
import com.xuecheng.search.application.service.CourseSearchApplication;
import com.xuecheng.search.application.vo.req.CourseSearchQry;
import com.xuecheng.search.domain.model.po.CourseIndex;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-09-01  10:02
 */
@Api(tags = "课程搜索接口")
@RestController
@RequestMapping("/course")
public class CourseSearchApi {

    @Autowired
    private CourseSearchApplication courseSearchApplication;

    @ApiOperation("课程搜索列表")
    @GetMapping("/list")
    public PageResult<CourseIndex> list(@Validated CourseSearchQry courseSearchQry){
        return courseSearchApplication.list(courseSearchQry);
    }
}
